/*
* @Project_description: 组织api
*/

export default ({ request }) => ({
//查询单个
  find(params) {
    return request({
      url: 'org/',
      method: 'get',
      params,
    })
  },
//查询list
  list(data) {
    return request({
      url: 'org/findOrgPageByCondition',
      method: 'post',
      data,
    })
  },
  //查询树
  tree(data) {
    return request({
      url: 'org/findOrgTree',
      method: 'post',
      data,
      repeat: true,
    })
  },
//修改
  put(data) {
    return request({
      url: 'org/updateOrgByCondition',
      method: 'post',
      data,
    })
  },
//添加单个
  add(data) {
    return request({
      url: 'org/createOrgInfo',
      method: 'post',
      data,
    })
  },
//删除
  del(params) {
    return request({
      url: 'org/deOrglById',
      method: 'get',
      params,
    })
  },
})
